<?php 

	//引入smarty
	include './libs/Smarty.class.php';

	//实例化对象
	$s = new Smarty;

	//初始化
	$s->template_dir = './view';
	$s->compile_dir = './view_c';
	$s->config_dir = './config';
	$s->left_delimiter = '<!--';
	$s->right_delimiter = '-->';
	$s->caching = true;
	$s->cache_dir = 'cache';
	$s->cache_lifetime = 5;

	//分配变量
	$s->assign('title','smarty测试');
	$s->assign('name','王水龙');

	$s->assign('date',date('Y-m-d H:i:s',time()));

	//解析模板
	$s->display('1.html');


 ?>